package verification.printformat;

import java.util.TreeSet;

import verification.customer.Customer;

public class PrintFormat {
	public static void printFormat(TreeSet<Customer> treeSet){
		for(Customer customer:treeSet){
			System.out.println("ID:"+customer.getId()+"\t\t"+"Name:"+customer.getName()+"\t\tSex:"+customer.getSex()+
					"\t\tEmail:"+customer.getEmail()+"\t\tBirthday:"+customer.getBirthday());
		}
	}
	
	public static void printCustomerXml(TreeSet<Customer> cs){
		System.out.println("<Customers>");
		for(Customer c:cs){
		System.out.println("\t<Customer id=\""+c.getId()+"\">");
		System.out.println("\t\t<name>"+c.getName()+"</name>");
		System.out.println("\t\t<email>"+c.getEmail()+"</email>");
		System.out.println("\t\t<sex>"+c.getSex()+"</sex>");
		System.out.println("\t\t<birthday>"+c.getBirthday()+"</birthday>");
		System.out.println("\t</Customer>");
		}
		System.out.println("</Customers>");
		}

}
